// App.js
// import React from 'react';
import Button from './components/Button';
import NewButton from './components/NewButton';
import { regOvComponent } from './hook/registry';
import withOverride from './hook/withOverride';
import React from 'react';
// 注册替换的 Button 组件
regOvComponent('myLibrary', 'Button', NewButton);

// 使用 withOverride 高阶组件来动态替换组件
const OverridableButton = withOverride('myLibrary', 'Button', Button);

const App = () => {
    return (
        <div>
            <h1>My App</h1>
            <OverridableButton label="Click Me" />
        </div>
    );
};

export default App;
